package org.diffgenova;


import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;


public class MainActivity extends TabActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        final TabHost tabHost = getTabHost();

        tabHost.addTab(tabHost.newTabSpec("rifiuti")
                .setIndicator("Rifiuti", getResources().getDrawable(R.drawable.ic_list_plastica))
                .setContent(new Intent(this, ListRifiutiActivity.class)));

        tabHost.addTab(tabHost.newTabSpec("categorie")
                .setIndicator("Categorie", getResources().getDrawable(R.drawable.ic_list_pile))
                .setContent(new Intent(this, ListCategorieActivity.class)));
        
//        // This tab sets the intent flag so that it is recreated each time
//        // the tab is clicked.
//        tabHost.addTab(tabHost.newTabSpec("tab3")
//                .setIndicator("destroy")
//                .setContent(new Intent(this, Controls2.class)
//                        .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)));
    }
}
